Make identical to the X11 implementation. (#322264, John Ehresman)
authorTor Lillqvist <tml@novell.com>
Mon, 2 Jan 2006 09:32:56 +0000 (09:32 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 2 Jan 2006 09:32:56 +0000 (09:32 +0000)
2006-01-02  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkwindow-win32.c
(gdk_window_impl_win32_get_visible_region): Make identical to the
X11 implementation. (#322264, John Ehresman)

ChangeLog
ChangeLog.pre-2-10
gdk/win32/gdkwindow-win32.c

index f83d8d76251ecc150f104bc18970027b466f1be7..712286122f1e17328a3ce3e904f8e278a1b80b81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-01-02  Tor Lillqvist  <tml@novell.com>
 
+       * gdk/win32/gdkwindow-win32.c
+       (gdk_window_impl_win32_get_visible_region): Make identical to the
+       X11 implementation. (#322264, John Ehresman)
+
        * gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
        invalidated region from ScrollWindowEx() instead of an incorrect
        attempt to calculate it ourselves. Fix by John Ehresman. (#323666)
index f83d8d76251ecc150f104bc18970027b466f1be7..712286122f1e17328a3ce3e904f8e278a1b80b81 100644 (file)
@@ -1,5 +1,9 @@
 2006-01-02  Tor Lillqvist  <tml@novell.com>
 
+       * gdk/win32/gdkwindow-win32.c
+       (gdk_window_impl_win32_get_visible_region): Make identical to the
+       X11 implementation. (#322264, John Ehresman)
+
        * gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
        invalidated region from ScrollWindowEx() instead of an incorrect
        attempt to calculate it ourselves. Fix by John Ehresman. (#323666)
index 580ac1c3f4e0f595b23147021f6d7351f498a380..d5c29f567b07f15837844289d465532139f5afd1 100644 (file)
@@ -282,7 +282,6 @@ gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable)
 {
   GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (drawable);
   GdkRectangle result_rect;
-  HDC hdc;
 
   result_rect.x = 0;
   result_rect.y = 0;
@@ -291,25 +290,6 @@ gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable)
 
   gdk_rectangle_intersect (&result_rect, &impl->position_info.clip_rect, &result_rect);
 
-  /* take this win32 specific part into account (smaller when obscured) */
-  hdc = GetDC (GDK_DRAWABLE_IMPL_WIN32_HANDLE (impl));
-  if (hdc)
-    {
-      RECT r;
-      if (SIMPLEREGION == GetClipBox (hdc, &r))
-        {
-          GdkRectangle gr;
-
-          gr.x = r.left + impl->position_info.x_offset;
-          gr.y = r.top + impl->position_info.y_offset;
-          gr.width = r.right - r.left;
-          gr.height = r.bottom - r.top;
-
-          gdk_rectangle_intersect (&result_rect, &gr, &result_rect);
-        }
-      ReleaseDC (GDK_DRAWABLE_IMPL_WIN32_HANDLE (drawable), hdc);
-    }
-
   return gdk_region_rectangle (&result_rect);
 }